package model;
/**
 * The Direction enumeration is used to identify the
 * cardinal directions.
 * 
 * @author Alexander Craig
 */
public enum Direction {
	NORTH, SOUTH, EAST, WEST;
	
	/**
	 * @return the opposite of the given direction
	 */
	public Direction getOpposite() {
		switch(this){
		case NORTH: return SOUTH;
		case EAST: return WEST;
		case SOUTH: return NORTH;
		case WEST: return EAST;
		default: return null; // can never happen, keeps compiler happy
		}
	}
}
